import 'dart:convert';

import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/face_recog_entity.g.dart';

export 'package:enterprise_v6_app/generated/json/face_recog_entity.g.dart';

@JsonSerializable()
class FaceRecogEntity {

	FaceRecogEntity();

	factory FaceRecogEntity.fromJson(Map<String, dynamic> json) => $FaceRecogEntityFromJson(json);
	String? status;
	String? image;
	List<FaceRecogResults>? results;

	Map<String, dynamic> toJson() => $FaceRecogEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class FaceRecogResults {

	FaceRecogResults();

	factory FaceRecogResults.fromJson(Map<String, dynamic> json) => $FaceRecogResultsFromJson(json);
	FaceRecogResultsPoints? points;
	double? simil;
	@JSONField(name: 'person_id')
	String? personId;

	Map<String, dynamic> toJson() => $FaceRecogResultsToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class FaceRecogResultsPoints {

	FaceRecogResultsPoints();

	factory FaceRecogResultsPoints.fromJson(Map<String, dynamic> json) => $FaceRecogResultsPointsFromJson(json);
	@JSONField(name: 'center_y')
	double? centerY;
	@JSONField(name: 'center_x')
	double? centerX;

	Map<String, dynamic> toJson() => $FaceRecogResultsPointsToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}
